###########
# Makefile
###########

.PHONY: all cmain1 cmain2 rmain clean

FC = gfortran

all: cmain1 cmain2 rmain

cmain1: cmain1/computationMain1.f95 
	@$(FC) -Wall -O3 -g -o bin/cmain1 \
	cmain1/computationMain1.f95 ./methods.f95

cmain2: cmain2/computationMain2.f95 
	@$(FC) -Wall -O3 -g -o bin/cmain2 \
	cmain2/computationMain2.f95 ./methods.f95
	
rmain: rmain/resultsMain.f95 
	@$(FC) -Wall -O3 -g -o bin/rmain \
	rmain/resultsMain.f95 rmain/outputPGPlot.f95 ./methods.f95 \
	-L /usr/lib -lpgplot -lcpgplot \
	-L /usr/lib/x86_64-linux-gnu -lpng12 \
	-L /usr/lib/x86_64-linux-gnu -lX11
	
clean:
	@rm -f bin/cmain1 *.mod
	@rm -f bin/cmain2 *.mod
	@rm -f bin/rmain *.mod
